/** 布局存储
 * @ 标  识: hchhIOT
 * @ 作  者: 阿拉丁矿工 黄传鸿 <hchhyzc@foxmail.com>
 */
/* ================================================================================================ */
//                                ★ 引入
/* ================================================================================================ */
import { defineStore } from "pinia";
type navigationType = {
  label: string;
  key: string;
  frameActive: boolean;
  labelShow: boolean;
  category: string;
}[];
/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 存储
/**———————————————————————————————————————————————————————————————————————————————————————————————— */
export const useLayoutStore = defineStore({
  id: "useLayoutStore",
  /* ================================================================================================ */
  //                               ★ state
  /* ================================================================================================ */
  state: (): any => {
    return {
      /* ★ 上框
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * ★ 上框
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
      */
      /* 上框参数*/
      topFrameInfo: { label: "折叠", fold: true, range: 50 },
      /** 上框导航*/
      topMenu: <navigationType>[
        { label: "工程", key: "projects", frameActive: true, labelShow: true, category: "top" },
        { label: "编辑", key: "editSelectMoveCopyDelete", frameActive: false, labelShow: true, category: "top" },
        { label: "包及图层", key: "editGroupLayout", frameActive: false, labelShow: true, category: "top" },
        { label: "对齐", key: "editAlign", frameActive: false, labelShow: true, category: "top" },
        { label: "线", key: "editLine", frameActive: false, labelShow: true, category: "top" },
        { label: "用户", key: "user", frameActive: false, labelShow: true, category: "top" },
      ],

      /*
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * ★ 左框
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
      */
      /** 左框参数*/
      leftFrameInfo: { label: "折叠", fold: true, range: 350 },
      /** 左边导航*/
      leftNavigation: <navigationType>[
        { label: "✒️绘制", key: "LeftDraw", frameActive: true, labelShow: true, category: "left" },
        { label: "🔮图元数据", key: "LeftPelData", frameActive: false, labelShow: true, category: "left" },
        { label: "🦾设备数据", key: "LeftEquipData", frameActive: false, labelShow: true, category: "left" },
        { label: "📽️动画", key: "LeftAnimation", frameActive: false, labelShow: false, category: "left" },
        { label: "⚡事件", key: "LeftEvent", frameActive: false, labelShow: false, category: "left" },
      ],

      // —————————————————————————————————————————————————————————————————————————————————————————| 右框
      /** 右框参数*/
      rightFrameInfo: { label: "折叠", fold: true, range: 350 },
      /** 右边导航 */
      rightNavigation: <navigationType>[
        { label: "工程", key: "RightProject", frameActive: true, labelShow: true, category: "right" },
        { label: "画笔", key: "RightPen", frameActive: false, labelShow: false, category: "right" },
        { label: "  块", key: "RightBlock", frameActive: false, labelShow: false, category: "right" },
        { label: "图元选择", key: "RightSelect", frameActive: false, labelShow: false, category: "right" },
        { label: "图元数据", key: "RightPelData", frameActive: false, labelShow: false, category: "right" },
        { label: "设备数据", key: "RightChannel", frameActive: false, labelShow: false, category: "right" },
        { label: "动画", key: "RightAnimation", frameActive: false, labelShow: false, category: "right" },
        { label: "事件", key: "RightEvent", frameActive: false, labelShow: false, category: "right" },
      ],

      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      // 🐸 下框
      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      /** 下框参数*/
      downFrameInfo: { label: "折叠", fold: true, range: 350 },
      /** 下框导航 */
      downNavigation: <navigationType>[
        { label: "工程", key: "DownProject", frameActive: true, labelShow: true, category: "down" },
        { label: "页面", key: "DownPage", frameActive: false, labelShow: true, category: "down" },
        { label: "画布", key: "DownCanvas", frameActive: false, labelShow: true, category: "down" },
        { label: "笔筒", key: "DownPenContainer", frameActive: false, labelShow: true, category: "down" },
        { label: "块组", key: "DownBlockGroup", frameActive: false, labelShow: true, category: "down" },
        { label: "图元参数", key: "DownPelAttr", frameActive: false, labelShow: false, category: "down" },
        { label: "日志", key: "Downlogs", frameActive: false, labelShow: true, category: "down" },
      ],

      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      // 🐸 中间框参数
      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      centerFrameInfo: 1
    };
  },

  /* ================================================================================================ */
  //                               ★ getters
  /* ================================================================================================ */
  getters: {},

  /* ================================================================================================ */
  //                               ★ actions
  /* ================================================================================================ */
  actions: {},
});
